const std = @import("std");
const chunk = @import("chunk.zig");

var gpa = std.heap.GeneralPurposeAllocator(.{}){};
pub const allocator = gpa.allocator();

pub fn main() void {
    @import("common.zig").common_init();

    var blk = chunk.Chunk.init();

    const constant_index = blk.add_constant(1.2);
    blk.write_chunk(@intFromEnum(chunk.OpCode.OP_CONSTANT));
    blk.write_chunk(@intCast(constant_index));

    blk.write_chunk(@intFromEnum(chunk.OpCode.OP_RETURN));

    blk.disassemble_chunk("test");
    blk.deinit();
}
